home *** CD-ROM | disk | FTP | other *** search
/ CD ROM Paradise Collection 4 / CD ROM Paradise Collection 4 1995 Nov.iso / program / swagg_m.zip / KEYBOARD.SWG / 0071_Pushing Chars into buffer.pas < prev    next >
Pascal/Delphi Source File  |  1994-02-03  |  693b  |  22 lines

  1. {
  2. From: MAYNARD PHILBROOK
  3. Subj: Re: keyboard buffer
  4. ---------------------------------------------------------------------------
  5.  TH> How do you write TO the keyboard buffer.
  6.  TH> I need a routine that will put a string into the keyboard buffer then
  7.  TH> exit to the calling program leaving the key buffer full.
  8.  TH> This is to simulate a macro function for a menu program.
  9. }
  10.  function PushIntoKeyBoard( c:char; ScanCode:Byte):boolean;
  11.   Begin
  12.    asm
  13.        Mov Ah, 05h
  14.        Mov Ch, ScanCode;
  15.        Int $16;
  16.        Mov  @result, Al;       { Results }
  17.    End;
  18.   Result := Not(Result);
  19.   End;
  20.  
  21. {returns true if Buffer took it other wise it mite be full or Not Supported}
  22.